const mongoose = require("mongoose");

const departmentSchema = new mongoose.Schema({
  name: {
    type: String,
    require: true,
    unique: true,
  },
  manager: {
    type: String,
    require: true,
  },
  code: {
    type: String,
    require: true,
    unique: true,
  },
  parentId: {
    type: String,
  },
  introduce: {
    type: String,
  },
});

const departmentModuls = mongoose.model("departments", departmentSchema);

module.exports = departmentModuls;
